<template>
	<div class="container">
		<el-form
		style="margin-top:20px;"
		    :model="ruleForm"
		    ref="ruleForm"
		    :rules="rules"
		    :label-position="labelPosition"
		    label-width="120px"
		    class="demo-ruleForm "
		>
			<el-row >
				<el-page-header @back="goback" content="查看检疫">
				</el-page-header>
			<!-- <el-col style="margin:20px;">
				<el-button>已检疫</el-button>
				<el-button type="primary">检疫</el-button>
			</el-col> -->
			    <el-col :span="12"  style="margin-top:20px;">
					<el-form-item label="养殖批号：" prop="batch">
					   {{ruleForm.batch}}
					</el-form-item>
			        <el-form-item label="检疫机构：" prop="type">
                     {{quarantine.mechanism}}
			        </el-form-item>
					<el-form-item label="检测依据：" prop="type">
					   {{quarantine.basis}}
					</el-form-item>
					<el-form-item label="检疫结果：" prop="spec">
                        {{quarantine.result}}
					</el-form-item>
					<el-form-item label="检测报告：" style="width:500px">
					    <img :src="quarantine.reportImg" alt="" style ="width: 200px; height:200px;">
					</el-form-item>
				</el-col>
				<el-col :span="10" style="margin-top:20px;">
					<el-form-item label="数量：" prop="type">
					    {{ruleForm.breedNumber}}
					</el-form-item>
					<el-form-item label="检疫负责人：">
                        {{quarantine.name}}
					</el-form-item>
					<el-form-item label="检疫日期：">
					  {{quarantine.time}}
					</el-form-item>
					<el-form-item label="检疫批号：">
					   {{quarantine.batch}}
					</el-form-item>
				</el-col>
			</el-row>
			<el-form-item class="footerFixed" label-width="0px">
			    <!-- <el-button type="primary" @click="submitrule('ruleForm')">提交</el-button> -->
			    <el-button @click="goback">返回</el-button>
			</el-form-item>
		</el-form>
	</div>
</template>

<script>
    import { quarantine_findById } from '@/request/breedApi';
	import uploadFile from '../../../common/uploadfile';
	export default{
		components: {
		    uploadFile
		},
		data(){
			return{
				rules:{},
				labelPosition:'right',
				ruleForm:{},
				quarantine:{},
				unitsList:[],
				typeList:[],
				listUrl:''
			}
		},
		mounted() {
			this.init();
		},
		methods:{
		// 页面一进来加载
        init() {
			 const _this = this;
			 this.id = _this.$route.query.id
			 quarantine_findById(this.id).then((res) => {
			   if (res.code == 200) {
				  this.ruleForm = res.data;
				  if(this.ruleForm.quarantine!=null){
					 this.quarantine=this.ruleForm.quarantine;
					 this.quarantine.reportImg = this.$store.state.imageUrls + this.quarantine.reportImg
				  }
			  }
			 });
        },

			goback(){
				this.$router.go(-1)
			},
			
		}
	}
</script>

<style scoped>
	
</style>
